Home
last modified time | relevance | path

Searched hist:"82 d90705" (Results 1 – 2 of 2) sorted by relevance

/qemu/include/sysemu/
H A Diothread.h82d90705 Thu Sep 28 02:59:56 GMT 2017 Peter Xu <peterx@redhat.com> iothread: export iothread_stop()

So that internal iothread users can explicitly stop one iothread without
destroying it.

Since at it, fix iothread_stop() to allow it to be called multiple
times. Before this patch we may call iothread_stop() more than once on
single iothread, while that may not be correct since qemu_thread_join()
is not allowed to run twice. From manual of pthread_join():

Joining with a thread that has previously been joined results in
undefined behavior.

Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20170928025958.1420-4-peterx@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
/qemu/
H A Diothread.c82d90705 Thu Sep 28 02:59:56 GMT 2017 Peter Xu <peterx@redhat.com> iothread: export iothread_stop()

So that internal iothread users can explicitly stop one iothread without
destroying it.

Since at it, fix iothread_stop() to allow it to be called multiple
times. Before this patch we may call iothread_stop() more than once on
single iothread, while that may not be correct since qemu_thread_join()
is not allowed to run twice. From manual of pthread_join():

Joining with a thread that has previously been joined results in
undefined behavior.

Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 20170928025958.1420-4-peterx@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>